/*
	File:	physics/DebugDrawer.hpp
	Date:	2013-06-09
	Author:	Asteroth
*/


#ifndef __ZEN_DEBUG_DRAWER__
#define __ZEN_DEBUG_DRAWER__

#include <btBulletDynamicsCommon.h>
#include <btBulletCollisionCommon.h>

#include "../gl.hpp"
#include "../video/ShaderManager.hpp"

namespace zen {

	namespace physics {

		class DebugDrawer : public btIDebugDraw {
		private:
			int debugMode;

		public:
			DebugDrawer();
			virtual ~DebugDrawer();

			virtual void	setDebugMode(int debugMode) { this->debugMode = debugMode; };
			virtual int		getDebugMode() const { return debugMode; }

			virtual void	reportErrorWarning(const char* warningString);

			virtual void	drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &fromColor, const btVector3 &toColor);
			virtual void	drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color);
			virtual void	drawSphere (const btVector3 &p, btScalar radius, const btVector3 &color);
			virtual void	drawTriangle(const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &color, btScalar alpha);
			virtual void	drawContactPoint(const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color);
			virtual void	draw3dText(const btVector3 &location, const char* textString);
		};

		

	} // namespace physics

} // namespace zen

#endif // __ZEN_DEBUG_DRAWER__
